Hello, |
Re: Data manipulation across object levels
Hello jnbharadhwaj,
Module m = current //you need execute the code from within the module you want to process
Object o, parO
for o in m do { //go through objects of current view of module and for objects of level-4...
if(level(o) == 4) {
parO = parent(o) //fetch parent object and...
o."Tested" = parO."Tested" "" //copy value for attribute "Tested" from parent object to current level-4 object
}
}
|
Re: Data manipulation across object levels Have you tried the "inherit value" flag in the attribute definition dialog box? Alain |
Re: Data manipulation across object levels adevicq - Mon Sep 17 08:26:38 EDT 2012 If your level 2 had no value for "tested" then your level 3 will inherit nothing. If you explictely set your level 3 to "Tested" then your level 4s will inherhit that value. You can change the value of the level 4 to perhaps "Failed" in which case it will no longer inherit. The key is that an obj-attr value with inherit .. err .. appear to inherit it's parent value when it's value is null.
If you have level 5 objects and don't want to see "Tested", then you are forced to set all of them to something benign like a space. -Louie |
Re: Data manipulation across object levels Thanks for the many replies. It more than helped me. I am using the parent function for each level4 object to trace its parent level3 object. Also as per llandale's suggestion also am explicitly checking each level4 object to ensure that any data that MAY be present in the "Tested" attribute will not be over written. Thanks again, Nayak |